package com.example.demo.common;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;

/**
 * @author Jack
 * @Title: Redis key过期消息订阅类
 * @Description: Redis key过期消息订阅类
 * @date 2018年1月8日22:11:40
 */
public class KeyExpiresMessageListener implements MessageListener {
    private static final Logger LOGGER = LoggerFactory.getLogger(KeyExpiresMessageListener.class);

    @Override
    public void onMessage(Message message, byte[] bytes) {
        LOGGER.info("监听到Redis key过期");
    }
}
